<?
/**
* Copyright (c) 2002-2007 BioWare Corp.
* http://www.bigdaddymonitor.org
*
* This file is part of the BigDaddy Monitoring
* program. It is free software distributed under
* the terms of the BSD License. It is ditributed
* in the hopes that it will be useful, but
* WITHOUT ANY WARRANTY; without event the implied
* warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE.
*
* The BSD License is available from:
* http://www.opensource.org/licenses/bsd-license.php
**/

if ($_REQUEST["page"]=="edit")
{
    $pageParams["include"]="quicklinks_edit.inc";
    $pageParams["title"]="Edit Quick Link";
}
else
{
	if ($_REQUEST["proc"]==1)
	{
		for ($i=0;$i<sizeof($_POST["catlist"]);$i++)
		{
			$sql="UPDATE quicklinks SET ord=".($i+1)." WHERE id=".$_POST["catlist"][$i];
			db_query($sql);
		}

		header("Location: ".$_SERVER["PHP_SELF"]);
		exit;
	}
    $pageParams["include"]="quicklinks.inc";
    $pageParams["title"]="Personal Links";
}

?>
